<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
	<meta charset="utf-8">
	<title>调休申请</title>
	<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0">

	<link rel="stylesheet" href="css/demo.css">
	<link rel="stylesheet" href="css/font-awesome.css">
	<link rel="stylesheet" href="css/sky-mega-menu.css">

	<link rel="stylesheet" href="css/bootstrap.css">
	<link rel="stylesheet" href="css/bootstrap-theme.css">





</head>
<body class="bg-blue">
<div class="body">
	<!-- mega menu -->
	<ul class="sky-mega-menu sky-mega-menu-anim-scale sky-mega-menu-response-to-icons">
		<!-- about -->
		<li>
			<a href="#"><i class="fa fa-lemon-o"></i>考勤管理系统</a>
		</li>

		<li class="right">
			<a href="/daka"><i class="fa fa-tags"></i>今日打卡</a>

		</li>
		<!-- contacts -->
		<li class="right">
			<a href="#_"><i class="fa fa-phone"></i>事项管理</a>
			<div class="grid-container3">
				<ul>
					<li><a href="/leave"><i class="fa fa-briefcase"></i>请假</a></li>
					<li><a href="/out"><i class="fa fa-briefcase"></i>外出</a></li>
					<li><a href="/comleave"><i class="fa fa-briefcase"></i>调休</a></li>
				</ul>
			</div>
		</li>
		<!--/ contacts -->

		<!-- drop me a line -->
		<li aria-haspopup="true" class="right">
			<a href="#_"><i class="fa fa-tasks"></i>员工信息</a>
			<div class="grid-container3">
				<ul>
					<li><a href="/info"><i class="fa fa-user"></i>个人信息</a></li>
					<li><a href="/cal"><i class="fa fa-print"></i>打卡记录</a></li>
					<li><a href="/logout"><i class="fa fa-chevron-circle-right"></i>注销</a></li>
				</ul>
			</div>

	</ul>
	<div class="col-lg-12"><br><br></div>
	<!--/ mega menu -->
	<div class="col-lg-4">
		<ul class="nav nav-pills nav-stacked" style="width:200px;text-align:center">

			<li class="active"><a href="/comleave">调休申请</a></li>
			<li class="active"><a href="/comleave2">调休记录</a></li>
		</ul>
	</div>

	<div style="margin: 20px" class="col-lg-4 bg-white">

		<form>
			<div class="form-group">
				<label >原开始时间</label>
				<input type="text" class="form-control  col-lg-2"   th:value="${clrecord.csrc}" readonly>
			</div>
			<div class="form-group">
				<label >现开始时间</label>
				<input type="text" class="form-control  col-lg-2"   th:value="${clrecord.cdst}" readonly>

			</div>
			<div class="form-group">
				<label >持续时间</label>
				<input type="text" class="form-control  col-lg-2"   th:value="${format}" readonly>
			</div>
			<div class="form-group">
				<label >调休理由</label>
				<textarea class="form-control" rows="3"th:placeholder="${clrecord.cdescription}" id = "reason" readonly></textarea>
			</div>
			<div class="form-group">
				<label >请假人</label><br>
				<span th:text="${employee.ename}"></span>
			</div>
			<div class="form-group">
				<label >文件流转</label><br>
				<div style="float:left ;" th:if="${clrecord.cdividagree } ne 0">
					<span style="color: red;">部门经理已同意------></span>
				</div>

				<div style="float:left;" th:if="${clrecord.cdeputyagree } ne 0">
					<span style="color: red;">副总经理已同意------></span>
				</div>

				<div style="float:left;" th:if="${clrecord.cgeneralagree } ne 0">
					<span style="color: red;">总经理已同意</span>
				</div>
			</div>

		</form>
	</div>
</div>


</body>


<script src="js/moment-with-locales.js"></script>
<script type="text/javascript" src="https://lib.baomitu.com/jquery/3.3.1/jquery.js"></script>
<script src="https://cdn.jsdelivr.net/npm/jquery@1.12.4/dist/jquery.min.js" ></script>
<script src="js/bootstrap.js"></script>
<script>
	function test() {
		alert("hello")
	}
	function sub(){

		var startDate = document.getElementById("startDate");
		var startTime = document.getElementById("startTime");

		startDate = JSON.stringify(startDate.value);
		startTime = JSON.stringify(startTime.value)

		var endDate = document.getElementById("endDate");
		var endTime = document.getElementById("endTime");

		endDate = JSON.stringify(endDate.value);
		endTime = JSON.stringify(endTime.value)

		var reason = document.getElementById("reason");
		reason = JSON.stringify(reason.value);

		var nowDate = document.getElementById("nowDate");
		var nowTime = document.getElementById("nowTime");

		nowDate = JSON.stringify(nowDate.value);
		nowTime = JSON.stringify(nowTime.value)

		$.ajax({
			type: "post",
			url: "/subComLeave",
			data:{"startDate":startDate,
				"startTime":startTime,
				"endDate":endDate,
				"endTime":endTime,
				"reason":reason,
				"nowDate":nowDate,
				"nowTime":nowTime},
			dataType:"json",
			success:function (result){
				console.info(result.data)
				if(result.data){
					console.info("即将跳转")
					layer.msg("已提交请求，即将跳转",{icon:1,time:500},function () {
						window.location = "/comleave2"
					})
				}
			}
		})

	}
</script>
</html>